package com.ghpt.controller;

import com.ghpt.pojo.PlanC;
import com.ghpt.pojo.Result;
import com.ghpt.service.PlanCService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/planc")
public class PlanCController {
    @Autowired
    private PlanCService planCService;
    @RequestMapping("/insert/{value}/{die}/{way}")
    public Result insert(@PathVariable int value, @PathVariable int die, @PathVariable int way){
        PlanC planC = new PlanC(way, die, value, null);
        return planCService.insert(planC) > 0 ? Result.success() : Result.error("提交失败");
    }
}
